home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
recom11.zip
/
RECOM.DOC
< prev
next >
Wrap
Text File
|
1997-07-01
|
3KB
|
88 lines
******* ReCom 1.1 *******
Recomments C/C++/ASM/BASIC Headers and Source Files, as well as GW-BASIC,
*.SYS (ie. CONFIG.SYS), BATch and Windows INI files. Example: You want
to comment each line of a C program so you can load it into QuickBasic and
work on each line to convert it to QuickBasic. You would do this:
recom /qs hello.c
This says to take the file hello.c and recomment each line with a ' and
have the output file named hello.bas. The original source is supposed to
be (and usually is) left untouched (unless some unforseen error I refuse
to be held responsible for happens).
History & Credits:
1.0
I lost the original source code to this one and it didn't have any file
checking capabilities.
1.1
I rewrote this from memory (not the computer's :) and I think I added
some more user error checking and file checking (can't recomment a C
file to a C Source file, for example). I think Joe Negron is the one
who wrote the Exist code (checks to see if a file exists). I know I
got it from a post in the QUIK_BAS FidoNet echo.
QUIRKS in the source/operation:
/g, /b, /i, /s: if you pass another letter with it (ie. /gh) then the
file is processed and the second letter ignored. However, due to some
parameter checking, you will get a help screen and no conversion if
you pass a /ss (since both the Lang$ and Source$ are the same). Some may
prefer to fix this quirk. I didn't think it would be a problem though
as you're really only supposed to use the one letter anyway. :)
If you are converting an ANSI C source to an ANSI C header, no conversion
is made. Basically, it just copies the file to another *.H file. I
figured for that, you might not even use this utility, just rename or
copy the source. It would take more code to parse out comments in the
C Source and adjust while commenting the header. Something I'm not up
to but if anyone else would like to add it in, feel free to do so.
USAGE: recom /switch infile.ext
infile.ext is the filename and extension of the source code file you want
to convert. The output file is determined by the use of one of the
following switches (only one switch can be used):
/qx QBasic/QuickBasic 4.5
/cx ANSI C
/px C++
/ax Assembly Language
/g GWBASIC
/b Batch File (.BAT)
/i .INI File
/s .SYS File
NOTE: x must be either an 's' (for source) or 'h' (for header)
Here's a chart of what can be converted:
(Note that QB stands for QuickBasic 4.5 or QBasic 1.1)
Destination File Switch Used
QB *.BAS /qs
QB *.BI /qh
ANSI C *.c /cs
ANSI C *.h /ch
C++ *.CPP /ps
C++ Header *.H /ph
Assembly *.ASM /as
Assebmly *.INC /ah
GW-BASIC *.BAS /g
Batch File *.BAT /b
Windows *.INI /i
CONFIG.SYS (or *.sys) /s
DISCLAIMER:
ReCom 1.1 is distributed on an "AS IS" basis. The author(s) disclaim all
warranties, expressed or implied, including but not limited to the
warranties of merchantability and of fitness for any purpose. The author(s)
assume no liability for damages, direct or consequential, which may
result from use of this program or any accompanying source(s).
CONTACT:
Tika Carr
FidoNet: 1:2613/313 or 1:2613/601
Internet: t.carr@pobox.com